'use strict';

const { Controller } = require('egg');

class DirController extends Controller {
  async index() {
    await this.ctx.success([
      {
        id: 101,
        name: 'API文档',
      },
      {
        id: 102,
        name: 'API文档',
        isDir: true,
        children: [
          {
            id: 103,
            name: 'API文档',
            isDir: true,
            children: [
              {
                id: 104,
                name: '文件1',
              },
              {
                id: 105,
                name: '文件2',
              },
            ],
          },
          {
            id: 106,
            name: 'API文档',
          },
        ],
      },
    ]);
  }
}

module.exports = DirController;
